'use strict';

const Controller = require('egg').Controller;
const RandExp = require('randexp');
const brands = require("../public/brands.js");

class PublicController extends Controller {
  async getCaptcha() {
    let { type } = this.ctx.query;
    let captcha = this.service.tool.getCaptcha(type);
    type == "data" && (this.ctx.response.type = "image/svg+xml");
    this.ctx.body = captcha;
  }
}

module.exports = PublicController;
